A Transformation System Combining Partial Evaluation with Term Rewriting
نویسنده
چکیده
This paper presents a new approach to optimizing functional programs based on combining partial evaluation and rewriting. Programs are composed of higher-order primitives. Partial evaluation is used to eliminate higher-order functions. First-order rewriting is used to process the transformation. Laws about the higher-order primitives that are relevant for the optimizations are automatically extracted from a library and transformed into rst-order terms using partial evaluation. Such a combination of a partial evaluation system and an intrinsically rst-order rewriting tool allows a form of higher-order rewriting at a rst-order level. This way, it is possible to automate deforestation of higher-order programs.
منابع مشابه
A Transformation System Combining Partial Evaluation
This paper presents a new approach to optimizing functional programs based on combining partial evaluation and rewriting. Programs are composed of higher-order primitives. Partial evaluation is used to eliminate higher-order functions. First-order rewriting is used to process the transformation. Laws about the higher-order primitives that are relevant for the optimizations are automatically ext...
متن کاملLazy Rewriting on Eager
We deene Lazy Term Rewriting Systems and show that they can be realized by local adaptations of an eager implementation of conventional term rewriting systems. The overhead of lazy evaluation is only incurred when lazy evaluation is actually performed. Our method is modelled by a transformation of term rewriting systems, which concisely expresses the intricate interaction between pattern matchi...
متن کاملTowards Generation of High-performance Transformations
In this paper we introduce a graph rewriting language, called Graph Rewriting and Transformation (GReAT), and a code generator tool, which together provide a programming framework for the specification and efficient realization of graph rewriting systems. We argue that the performance problems frequently associated with the implementation of the transformation can be significantly reduced by ad...
متن کاملNarrowing-Driven Partial Evaluation of Functional Logic Programs
Languages that integrate functional and logic programming with a complete operational semantics are based on narrowing, a unification-based goal-solving mechanism which subsumes the reduction principle of functional languages and the resolution principle of logic languages. Formal methods of transformation of functional logic programs can be based on this well-established operational semantics....
متن کاملPartial Evaluation of Functional Logic Programs in Rewriting-based Languages
The aim of this work is to describe a procedure for the partial evaluation of functional logic languages based on rewriting. In this work, we will use the Escher language as an example of a (concurrent) functional logic language which has rewriting as its computational mechanism. Partial evaluation is a program transformation technique which, by performing some computation and abstraction at co...
متن کامل